#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QProcess>
#include <QMessageBox>
#include <QFileDialog>
#include <QtDebug>
#include <QDate>

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

    QString generateNewFileName(const QString &originalFileName,int idx);
private:
    QStringList name_string={"","淘宝订单图片","付款记录图片","快递物流图片","实物图片"};
    QFile pdf_file;
    QFile taobao_pic;
    QFile bill_rec_pic;
    QFile press_pic;
    QFile real_thing_pic;

private slots:
    void on_commitButton_clicked();

    void on_cancleButton_2_clicked();

    void on_PDFChooseButton_clicked();

    void on_BillPicChooseButton_clicked();

    void on_BillRecChooseButton_clicked();

    void on_PressPicChooseButton_clicked();

    void on_RealThingPicChooseButton_clicked();

    void on_PDFPasteButton_clicked();

    void on_TaobaoPasteButton_clicked();

    void on_BillRecPasteButton_clicked();

    void on_PressPasteButton_clicked();

    void on_RealThingPasteButton_clicked();

//    void on_DateLineEdit_editingFinished();

    void on_BillNumerLineEdit_editingFinished();

    void on_NameLineEdit_editingFinished();

    void on_TotalPriceLineEdit_editingFinished();

    void on_ObjectNameLineEdit_editingFinished();

    void on_UsageLineEdit_editingFinished();

    void finishEditOperation();

    void on_dateEdit_editingFinished();

protected:
    // 事件处理函数
    void dragEnterEvent(QDragEnterEvent *event) override;  // 处理拖拽进入事件
    void dropEvent(QDropEvent *event) override;  // 处理放置事件

private:
    Ui::Widget *ui;
};
#endif // WIDGET_H
